import service from "@/services/abstract.service";

export class HistoryService {

  // 提出问题
  public static question(question: string) {
    return service({
      url: "/data/history/question",
      method: "get",
      params: {
        question
      }
    });
  }

  // 回答问题
  public static answer(history_id: number, answer: string) {
    return service({
      url: "/data/history/answer",
      method: "get",
      params: {
        history_id,
        answer
      }
    });
  }

  // 标记答案
  public static mark(history_id: number) {
    return service({
      url: "/data/history/mark",
      method: "get",
      params: {
        history_id
      }
    });
  }

  // 怀疑答案
  public static doubt(history_id: number) {
    return service({
      url: "/data/history/doubt",
      method: "get",
      params: {
        history_id
      }
    });
  }

  // 查看所有问题
  public static getTotal() {
    return service({
      url: "/data/history/total",
      method: "get"
    });
  }


  // 查看系统回答的问题
  public static getSystem() {
    return service({
      url: "/data/history/system",
      method: "get"
    });
  }

  // 查看我提出的问题
  public static getMyQuestion() {
    return service({
      url: "data/history/my_question",
      method: "get"
    });
  }

  // 查看我回答的问题
  public static getMyAnswer() {
    return service({
      url: "data/history/my_answer",
      method: "get"
    });
  }

  // 查看问题详情
  public static detail(history_id: number) {
    return service({
      url: "data/history/detail",
      method: "get",
      params: {
        history_id
      }
    })
  }

}
